/*
 * @Author: HuangYue
 * @Date: 2022-02-26 19:17:10
 * @LastEditors: HuangYue
 * @LastEditTime: 2022-02-27 11:38:33
 * @FilePath: /graduation/config/proxy.js
 * @Description:
 */
/**
 * 在生产环境 代理是无法生效的，所以这里没有生产环境的配置
 * -------------------------------
 * The agent cannot take effect in the production environment
 * so there is no configuration of the production environment
 * For details, please see
 * https://pro.ant.design/docs/deploy
 */
export default {
  dev: {
    //mock 数据
    '/mock/': {
      // 要代理的地址
      target: 'http://172.31.12.99:8000',
      // 配置了这个可以从 http 代理到 https
      // 依赖 origin 的功能可能需要这个，比如 cookie
      changeOrigin: true,
      pathRewrite: {
        '^': '',
      },
    },
    // 真实后台 api
    //target  服务器地址
    '/api/': {
      target: 'http://172.31.12.99:8000',
      changeOrigin: true,
      pathRewrite: {
        '^': '',
      },
    },
  },
  pre: {
    '/api/': {
      target: 'your pre url',
      changeOrigin: true,
      pathRewrite: {
        '^': '',
      },
    },
  },
};
